#ifndef I_IO_HANDLER_H
#define I_IO_HANDLER_H

#include <boost/shared_ptr.hpp>

class IIoAttachment
{
public:
	typedef boost::shared_ptr<IIoAttachment> Ptr;
	virtual ~IIoAttachment(){}
};

class IPackage;
class IIoHandler
{
protected:
	IIoAttachment::Ptr attachment_;
public:
	typedef boost::shared_ptr<IIoHandler> Ptr;
	virtual void close() = 0;
	virtual void start() = 0;
	virtual void send(boost::shared_ptr<IPackage> package) = 0;
	virtual void send(IPackage* package) = 0;
	inline IIoAttachment::Ptr getAttachment() { return attachment_; }
	inline void setAttachment(IIoAttachment::Ptr attachment) { attachment_ = attachment; }

	virtual ~IIoHandler(){}
};

#endif
